home *** CD-ROM | disk | FTP | other *** search
/ Robotics & Artificial Int…3 (Professional Edition) / Robotics & Artificial Intelligence Tools 2003 (Professional Edition).iso / computer vision recognition / rcinstall.exe / Disk1 / data1.cab / ASP_Pages / WebHelp / ehlpdht2.js < prev    next >
Encoding:
JavaScript  |  2001-12-12  |  69.1 KB  |  2,220 lines

  1. //// Segment Begin -- (JavaScript 1.2)
  2. // eHelp« Corporation Dynamic HTML JavaScript 
  3. // Copyright⌐ 1998-2000 eHelp« Corporation.All rights reserved.
  4. // Version=4.45
  5. // patch 1
  6.  
  7. // Warning:Do not modify this file.It is generated by RoboHELP« and changes will be overwritten.
  8.  
  9.  
  10. /// Section Begin  - kadov DHTM (JavaScript 1.2)
  11.  
  12. //Begin to support extended and dropdown text effects.
  13. function kadovIsParagraph(el)
  14. {
  15.     return( el.tagName == "P" || el.tagName.indexOf("H") == 0 ) ? true : false;
  16. }
  17.  
  18. function kadovInitEachChild(el)
  19. {    
  20.     for(var i=0; i<el.children.length; i++)
  21.     {
  22.         var child = el.children[i];
  23.         if( child.tagName == "SCRIPT" || child.tagName == "!" )
  24.             continue;
  25.  
  26.         if( child.id != "" )
  27.         {
  28.             // to wipe out the onload effects
  29.             var onLoadEffect = child.style.getAttribute( "x-on-pageload" );
  30.             if( (onLoadEffect != null) && (onLoadEffect > "") )
  31.                 child.style.setAttribute( "x-on-pageload", "" );
  32.             
  33.             var href = child.getAttribute("href")
  34.             if( href != null && href > "" && href.indexOf( "BSSCPopup" ) >= 0 )
  35.                 kadovFilePopupInit(child.id); // Init for Popup
  36.             else if( child.className == "dropspot" || child.className == "expandspot" || 
  37.                      child.className == "glossterm" )
  38.                 kadovTextPopupInit(child.id);// Init for Expanding/Glossary or DropDown text
  39.             else if( child.className == "trigger")
  40.                 kadovInitTrigger(child.id);// Init for Trigger
  41.             else
  42.             {
  43.                 kadovInitEffects(child.id);// Init for DHTML effects
  44.                 CEngine.SetOneTargetInitialState( child.id );
  45.             }
  46.         }
  47.         
  48.         if( (child.tagName == "IMG") && (child.getAttribute("dynsrc") > "") )
  49.             child.start = "mouseover";// to start a AVI file. fileopen doesn't work
  50.  
  51.         kadovInitEachChild(child);
  52.     }
  53. }
  54.  
  55. function kadovRetrieveTextInner(el)
  56. {    
  57.     var x = "";
  58.     if( (!el) || (el.tagName == "!") || (el.tagName == "SCRIPT" ))
  59.         return x;
  60.  
  61.     if( kadovIsParagraph(el) )
  62.     {
  63.         var strNewID = " ";
  64.         if( el.id != "" )
  65.             strNewID += "id=" + el.id + "_NewSpan ";
  66.         x = "<span" + strNewID + "style='" + el.style.cssText + "'>" + el.innerHTML + "</span>";
  67.     }
  68.     else
  69.     {
  70.         for(var i=0; i<el.children.length; i++)
  71.             x += kadovRetrieveTextInner( el.children[i] );
  72.     }
  73.     return x;
  74. }
  75.  
  76. function kadovRetrieveCleanHTML( strRawHTML, strTagOpen, strTagClose, nDistance )
  77. {    
  78.     var nTagOpen = strRawHTML.indexOf( strTagOpen, 0 );
  79.     if( nTagOpen < 0 )
  80.         return strRawHTML;
  81.  
  82.     var nTagClose = strRawHTML.indexOf( strTagClose, nTagOpen);
  83.     if( nTagClose < nTagOpen )
  84.         return strRawHTML;
  85.         
  86.     if( typeof(nDistance) == "number" && nDistance > 0 )
  87.         if( (nTagClose - nTagOpen) != nDistance )
  88.             return strRawHTML;
  89.         
  90.     var strCleanOnce = strRawHTML.substring(0, nTagOpen) + strRawHTML.substr(nTagClose + strTagClose.length) ;
  91.     return     kadovRetrieveCleanHTML( strCleanOnce, strTagOpen, strTagClose );
  92. }
  93.  
  94. function kadovAdjustObjectTag(strRawHTML, nStartPos)
  95. {// adjust object tag for related topics HTML control, because innerHTML misses out the item settings
  96.     
  97.     //Is there any DTC?
  98.     var strDTCTagOpen = '<!--Metadata type="DesignerControl" startspan';
  99.     var strDTCTagClose = '<!--Metadata type="DesignerControl" endspan-->';
  100.     var nDTCTagOpen = strRawHTML.indexOf( strDTCTagOpen, nStartPos );
  101.     if( nDTCTagOpen < 0 )
  102.         return strRawHTML;
  103.     var nDTCTagClose = strRawHTML.indexOf( strDTCTagClose, nDTCTagOpen );
  104.     if( nDTCTagClose < nDTCTagOpen)
  105.         return strRawHTML; // no Design Time Controls;
  106.         
  107.     //Is the DTC HTML Help Control?
  108.     var strRTObjTagOpen = 'classid=clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11';
  109.     var strRTObjTagClose = '</OBJECT>';
  110.     var nRTObjTagOpen = strRawHTML.indexOf( strRTObjTagOpen, nDTCTagOpen );
  111.     if( nRTObjTagOpen < nDTCTagOpen )
  112.         return strRawHTML;
  113.     var nRTObjTagClose = strRawHTML.indexOf( strRTObjTagClose, nRTObjTagOpen );
  114.     if( nRTObjTagClose < nRTObjTagOpen )
  115.         return strRawHTML; // is not a HTML help control
  116.         
  117.     // Is it a related Topics html help control?
  118.     var strRTObjLabel = '<PARAM NAME=\"Command\" VALUE=\"Related Topics';
  119.     if( strRawHTML.indexOf(strRTObjLabel, nRTObjTagOpen) < 0 )
  120.         return strRawHTML;
  121.     
  122.     // does the commented object tag contain a items parameters        
  123.     var strRTItemsOpen = '<param name=Items value="';
  124.     var strRTItemsClose = '$$**$$" >';
  125.     var nRTItemsOpen = strRawHTML.indexOf(strRTItemsOpen, nDTCTagOpen);
  126.     if( nRTItemsOpen < nDTCTagOpen )
  127.         return strRawHTML;
  128.     var nRTItemsClose = strRawHTML.indexOf(strRTItemsClose, nRTItemsOpen);
  129.     if( nRTItemsClose < nRTItemsOpen )
  130.         return strRawHTML;
  131.         
  132.     // found a items string
  133.     var strItems = strRawHTML.substring( nRTItemsOpen + strRTItemsOpen.length, nRTItemsClose);
  134.     if( strItems.length < 1 )
  135.         return strRawHTML;
  136.     
  137.     // to reconstruct the item(s) param tag(s)
  138.     var strItemsArray = strItems.split('$$**$$');
  139.     if( strItemsArray.length < 1 )
  140.         return strRawHTML;
  141.     var strRunTimeItemParam = "";
  142.     for( var i = 0; i < strItemsArray.length; i++ )
  143.     {
  144.         strRunTimeItemParam += '<PARAM  NAME="Item' + (i+1);
  145.         strRunTimeItemParam += '"' + '  VALUE="';
  146.         strRunTimeItemParam += strItemsArray[i];
  147.         strRunTimeItemParam += '">';
  148.     }
  149.     
  150.     // to insert the reconstructed item params into runtime object tag
  151.     var strAdjustedHTML = strRawHTML.substring(0,nRTObjTagClose) + strRunTimeItemParam + strRawHTML.substring(nRTObjTagClose, strRawHTML.length);
  152.     return kadovAdjustObjectTag(strAdjustedHTML, nDTCTagClose + strDTCTagClose.length);
  153. }
  154.  
  155. function kadovTextPopupOnLoad( el )
  156. {
  157.     if( !CCSSP.bIsWinOS )
  158.         return;
  159.  
  160.     if( typeof(el) == "string" )
  161.         el = document.all.item(el);
  162.  
  163.     var src = el.getAttribute( "x-use-popup" );
  164.     if(!src)
  165.         return;
  166.  
  167.     var name = src;
  168.     if( src.substr(0,1) == "#" ) 
  169.         name = src.substr(1, src.length-1);
  170.     var srcDiv = document.all.item(name);
  171.     if( !srcDiv )
  172.         return 1;
  173.  
  174.     var type = el.getAttribute( "x-popup-type" );
  175.     var setup = el.getAttribute( "x-tmp-setup" );
  176.     var newId = name;
  177.     if( newId.indexOf( "_tmp") <= 0 )
  178.         newId += "_tmp";
  179.  
  180.     if( !setup )
  181.     {
  182.         el.setAttribute( "x-tmp-setup", 1 );
  183.     
  184.         if( type == "pulldown"  )
  185.         {
  186.             var strAdjust = kadovAdjustObjectTag(srcDiv.innerHTML,0);
  187.             var strCleanHTML = kadovRetrieveCleanHTML(strAdjust, "<!--", "-->");
  188.             strCleanHTML = kadovRetrieveCleanHTML(strCleanHTML, "<SCRIPT", "/SCRIPT>");
  189.  
  190.             //work around the bug in HH.exe that highlight the phrases when use Search tab
  191.             //this approach is just removing the <FONT...> tag inserted by Microsoft in the runtime
  192.             strCleanHTML = kadovRetrieveCleanHTML(strCleanHTML, "<FONT color=#", "\">", 52);
  193.             
  194.             var strStyle = " style='display:none; position:relative;";
  195.             var newDiv = "<div class=droptext id=" + newId + strStyle + "'>" + strCleanHTML + "</div>";
  196.  
  197.             srcDiv.outerHTML = ""; // empty the original DIV tag
  198.             var elParentPra = kadovFindParentParagraph(el);
  199.             if( elParentPra )
  200.                 elParentPra.insertAdjacentHTML( "AfterEnd", newDiv );
  201.         }
  202.         else if( type == "expanding"  )
  203.         {
  204.             var inner = kadovRetrieveTextInner(srcDiv);
  205.             if( inner == "" )
  206.                 inner = srcDiv.innerHTML;
  207.             var strAdjust = kadovAdjustObjectTag(inner,0);
  208.             var strCleanHTML = kadovRetrieveCleanHTML(strAdjust, "<!--", "-->");
  209.             strCleanHTML = kadovRetrieveCleanHTML(strCleanHTML, "<SCRIPT", "/SCRIPT>");
  210.             var strClassName = (el.className == "glossterm") ? "glosstext" : "expandtext";
  211.             var newSpan = "<span class=" + strClassName + " style='display: none;' id=" + newId + "> " + strCleanHTML + "</span>";
  212.             srcDiv.outerHTML = ""; // empty the original DIV tag
  213.             el.insertAdjacentHTML( "AfterEnd", newSpan );
  214.         }
  215.     }
  216. }
  217.  
  218. function kadovTextPopup( el )
  219. {
  220.     if( (!CCSSP.bIsWinOS) || (window.event == null) )
  221.         return;
  222.     window.event.cancelBubble = true;
  223.  
  224.     if( typeof(el) == "string" )
  225.         el = document.all.item(el);
  226.  
  227.     var src = el.getAttribute( "x-use-popup" );
  228.     if(!src)
  229.         return 1;
  230.  
  231.     var name = src;
  232.     if( src.substr(0,1) == "#" ) 
  233.         name = src.substr(1, src.length-1) + "_tmp";
  234.     var srcDiv = document.all.item(name);
  235.     if( !srcDiv )
  236.         return 1;
  237.  
  238.     var type = el.getAttribute( "x-popup-type" );
  239.     var setup = el.getAttribute( "x-tmp-setup" );
  240.     if( srcDiv )
  241.     {
  242.         if( srcDiv.style.display == "" )
  243.             srcDiv.style.display = "none";
  244.         else
  245.         {
  246.             srcDiv.style.display = "";
  247.             if( typeof(srcDiv.bInitialized) == "undefined" )
  248.             {
  249.                 srcDiv.bInitialized = true;
  250.                 kadovInitEffects(name);
  251.                 kadovInitEachChild(srcDiv);
  252.             }
  253.         }
  254.     }
  255. }
  256.  
  257. function kadovFindParentParagraph( el )
  258. {
  259.     if( typeof(el) == "string" )
  260.         el = document.all.item(el);
  261.     if( (!el) || el.tagName == "BODY" )
  262.         return null;
  263.     if( kadovIsParagraph(el.parentElement) )
  264.         return el.parentElement;
  265.     else
  266.         return kadovFindParentParagraph( el.parentElement );
  267. }
  268.  
  269. //Begin HTML code invoked function
  270. function kadovRegisterEventHandler( obj, strEvent, strEventHandler )
  271. {
  272.     if( !gbBsIE4 )
  273.         return;
  274.     CCSSP.RegisterEventHandler( obj, strEvent, strEventHandler );
  275. }
  276.  
  277. function kadovTextPopupInit( el )
  278. {
  279.     if( (!gbBsIE4) || (!CCSSP.bIsWinOS) )
  280.         return;
  281.         
  282.     if( typeof(el) == "string" )
  283.         el = document.all.item(el);
  284.     if( el != null )
  285.     {
  286.         CCSSP.RegisterEventHandler( el, "onclick", "kadovTextPopup(" + el.id +");" );
  287.         CCSSP.RegisterEventHandler( window, "onload", "kadovTextPopupOnLoad(" + el.id +");" );
  288.     }
  289. }
  290. //End HTML code invoked function
  291.  
  292. //End to support extended and dropdown text effects.
  293.  
  294. //Begin to convert iWrite format to RoboEditor Format for DHTML effects
  295. function kadovInitTriggersInHead( )
  296. {
  297.   if( Object.xDelayedInitElements )
  298.   {
  299.      var x = Object.xDelayedInitElements;
  300.      for(i=0; i<x.length; i++)
  301.          kadovInitTrigger( x[i] );
  302.   }
  303. }
  304.  
  305. //Begin HTML code invoked function
  306. function kadovFilePopupInit( el )
  307. {
  308.     if( !gbBsIE4 )
  309.         return;
  310.     if( typeof(el) == "string" )
  311.         el = document.all.item(el);
  312.  
  313.     if( el != null )
  314.         CCSSP.RegisterEventHandler( el, "onmouseover", "BSPSPopupOnMouseOver(event);" );
  315. }
  316.  
  317. function kadovInitTrigger( element )
  318. {
  319.     if( !gbBsIE4 )
  320.         return;
  321.     var srcElement = element;
  322.     if( typeof(srcElement) == "string" )
  323.     {
  324.         srcElement = document.all.item(element,0);
  325.         if(srcElement == null)
  326.             return;
  327.     }
  328.     
  329.     if( !kadovIsParentVisible(srcElement) )
  330.         return;
  331.  
  332.     var targets = srcElement.getAttribute( "x-targets" );
  333.     var arrOneTarget = targets.split( "," );
  334.     for( var i = 0; i < arrOneTarget.length; i ++ )
  335.         bsscFXInit( element, arrOneTarget[i], null, null, null, null );
  336. }
  337.  
  338. function kadovIsParentVisible( el )
  339. {
  340.     if( typeof(el) == "string" )
  341.         el = document.all.item(el);
  342.     if( (!el) || el.tagName == "BODY" )
  343.         return true;
  344.     if( el.style.display == 'none' ) //el.visibility == 'hidden' || 
  345.         return false;
  346.     else
  347.         return kadovIsParentVisible( el.parentElement );
  348. }
  349.  
  350. function kadovInitEffects( element )
  351. {
  352.     if( !gbBsIE4 )
  353.         return;
  354.     var srcElement = element;
  355.     if( typeof(srcElement) == "string" )
  356.     {
  357.         srcElement = document.all.item(element,0);
  358.         if(srcElement == null)
  359.             return;
  360.     }
  361.     
  362.     if( !kadovIsParentVisible(srcElement) )
  363.         return;
  364.     
  365.     kadovInitEffect( srcElement, "x-on-hover" );
  366.     kadovInitEffect( srcElement, "x-on-pageclick" );
  367.     kadovInitEffect( srcElement, "x-on-pageload" );
  368.     kadovInitEffect( srcElement, "x-on-trigger-1" );
  369.     kadovInitEffect( srcElement, "x-on-trigger-2" );
  370. }
  371. //End HTML code invoked function
  372.  
  373. function kadovInitEffect( element, prop )
  374. {
  375.     var values = null;
  376.     if( element.getAttribute( "currentStyle" ) )
  377.         values = element.currentStyle.getAttribute( prop );
  378.     else 
  379.         values = element.style.getAttribute( prop );
  380.     if( !values )
  381.         return;
  382.  
  383.     var functions = new Array();
  384.     var nIdx = 0, nStart = 0;
  385.     var nNext = values.indexOf( "\)", 0);
  386.     while( nNext >= 0 && nNext < values.length )
  387.     {
  388.         functions[nIdx] = values.substr( nStart, nNext-nStart+1);
  389.         nStart = nNext + 1;
  390.         nIdx++;
  391.         nNext = values.indexOf( "\)", nStart);
  392.     }
  393.         
  394.     for( var i=0; i<functions.length; i++)
  395.     {
  396.         var id = element.getAttribute( "id" );
  397.         var translatedProp = kadovTranslateProp(prop);
  398.  
  399.         var lp = functions[i].indexOf( "(" );
  400.         var fnname = functions[i].substring(0, lp);
  401.         var srcargs = functions[i].substring(lp+1, functions[i].length-1);
  402.         
  403.         var nClickTimes = 1;
  404.         var arrForClickCount = srcargs.split( "," );
  405.         for( var j = 0; j < arrForClickCount.length; j++ )
  406.         {// to locate and get the "clicks=99" settings
  407.             var nPageClick = arrForClickCount[j].indexOf("clicks");
  408.             if( nPageClick >= 0 )
  409.             {
  410.                 nPageClick = arrForClickCount[j].indexOf("=");
  411.                 if( nPageClick > 0 )
  412.                 {
  413.                     nClickTimes = arrForClickCount[j].substring( nPageClick + 1, arrForClickCount[j].length) * 1;
  414.                     break;
  415.                 }
  416.             }
  417.         }
  418.         var args = srcargs;
  419.         if( j < arrForClickCount.length )
  420.         {// to strip out the "clicks=99" from the arguments string
  421.             args = "";
  422.             for( var k = 0; k < arrForClickCount.length; k ++ )
  423.             {
  424.                 if( k != j )
  425.                 {
  426.                     args += arrForClickCount[k];
  427.                     if( k < arrForClickCount.length - 1 )
  428.                         args += ",";
  429.                 }
  430.             }
  431.         }
  432.         bsscFXInit( null, id, translatedProp, fnname, args, nClickTimes );
  433.     }
  434. }
  435.  
  436. function kadovTranslateProp( prop )
  437. {
  438.     switch( prop )
  439.     {
  440.     case "x-on-hover" :     return "bsschover";
  441.     case "x-on-pageclick" : return "bsscpageclick";
  442.     case "x-on-pageload" :  return "bsscpageload";
  443.     case "x-on-trigger-1" : return "bssctrigger1";
  444.     case "x-on-trigger-2" : return "bssctrigger2";
  445.     }
  446.     return null;
  447. }
  448. //End to convert iWrite format to RoboEditor Format for DHTML effects
  449.  
  450. //Begin the definition of one entry to DHTML effects
  451. function bsscFXInit( trigger_ID, target_ID, event_type, 
  452.     action_type, action_setting, event_addional )
  453. {
  454.     if( !CCSSP.bIsWinOS || typeof(target_ID) != "string" )//MUST have a target_ID
  455.         return; // we don't support Navigator yet
  456.     
  457.     if( typeof(event_type) == "string" )
  458.         event_type = event_type.toLowerCase();
  459.     if( typeof(action_type) == "string" )
  460.         action_type = action_type.toLowerCase();
  461.     if( typeof(action_setting) == "string" )
  462.          action_setting = action_setting.toLowerCase();
  463.     
  464.     // to get the target element then add it to the target list
  465.     var eleTarget = CCSSP.GetObject( target_ID );
  466.     if( (eleTarget != null) && (event_type != null) && (action_type != null) )
  467.     {
  468.         CEngine.AddOneTarget( target_ID, eleTarget );
  469.         CEngine.BuildTargetObject(target_ID, event_type, action_type, action_setting, event_addional);
  470.     }
  471.     
  472.     // to validate the trigger_ID parameter
  473.     if( typeof(trigger_ID) == "string" && trigger_ID != "" )
  474.         CEngine.BuildTriggerObject( trigger_ID, target_ID );
  475. }    
  476. //End the definition of one entry to DHTML effects
  477.  
  478.  
  479. /// Section End  - kadov DHTM (JavaScript 1.2)
  480.  
  481.  
  482. /// Section Begin  - CCSSP DHTM (JavaScript 1.2)
  483.  
  484. //Begin JavaScript libary for cross-platform positioning object.
  485. function CCSSP(){} // constructor of CCSSP class
  486.  
  487. CCSSP.strAgent = navigator.userAgent.toLowerCase(); 
  488. CCSSP.nAppVersion = parseInt(navigator.appVersion);
  489.  
  490. CCSSP.bIsWinOS = ((CCSSP.strAgent.indexOf("win") >= 0) || (CCSSP.strAgent.indexOf("16bit") >= 0));
  491. CCSSP.bIsMacOS = (CCSSP.strAgent.indexOf("mac") >= 0);
  492.  
  493. CCSSP.bIsIE = (navigator.appName.indexOf("Microsoft") >= 0);
  494. CCSSP.bIsIE4 = (CCSSP.bIsIE && (CCSSP.nAppVersion >= 4));
  495. CCSSP.bIsIE5 = (CCSSP.bIsIE4 && (CCSSP.strAgent.indexOf("msie 5") != -1) )
  496.  
  497. CCSSP.bIsNav = (navigator.appName.indexOf("Netscape") >= 0);
  498. CCSSP.bIsNav4 = (CCSSP.bIsNav && (CCSSP.nAppVersion >= 4));
  499. CCSSP.bIsNav6 = (CCSSP.bIsNav && (CCSSP.nAppVersion >= 5));
  500.  
  501. CCSSP.GetObject = function( obj )
  502. {//convert object name string or reference into a valid object reference
  503.     if( typeof(obj) == "object" )
  504.         return obj;
  505.     else if( typeof(obj) == "string" && obj != "")
  506.     {
  507.         if( CCSSP.bIsNav4 )
  508.             return eval("document." + obj);
  509.         else
  510.             return eval("document.all." + obj);
  511.     }
  512.     else
  513.         return null;
  514. }
  515.  
  516. CCSSP.MoveObjectTo = function(obj, x, y)
  517. {//positioning an object at a specific pixel coordinate
  518.     if( CCSSP.bIsNav4 )
  519.         obj.moveTo(x,y);
  520.     else
  521.     {
  522.         obj.style.pixelLeft = x;
  523.         obj.style.pixelTop = y;
  524.     }
  525. }
  526.  
  527. CCSSP.MoveObjectBy = function(obj, dx, dy)
  528. {//moveing a object by x and/or y pixel
  529.     if( CCSSP.bIsNav4 )
  530.         obj.moveBy(dx,dy);
  531.     else
  532.     {
  533.         obj.style.pixelLeft += dx;
  534.         obj.style.pixelTop += dy;
  535.     }
  536. }
  537.  
  538. CCSSP.SetObjectBGColor = function(obj, color)
  539. {//set the background color of an object
  540.     if( CCSSP.bIsNav4 )
  541.         obj.bgColor = color;
  542.     else
  543.         obj.style.backgroundColor = color;
  544. }
  545.  
  546. CCSSP.ShowObject = function(obj, bShow)
  547. {// set the object to be visible or invisible
  548.     if( CCSSP.bIsNav4 )
  549.         obj.visibility = (bShow == true) ? 'show' : 'hide';
  550.     else
  551.         obj.style.visibility = (bShow == true) ? 'visible' : 'hidden';// when hidden, it still occupy some space.
  552. }
  553.  
  554. CCSSP.GetObjectLeft = function(obj)
  555. {// retrieve the x coordinate of a posionable object
  556.     if( CCSSP.bIsNav4 )
  557.         return obj.left;
  558.     else
  559.         return obj.style.pixelLeft;
  560. }
  561.  
  562. CCSSP.GetObjectTop = function(obj)
  563. {// retrieve the y coordinate of a posionable object
  564.     if( CCSSP.bIsNav4 )
  565.         return obj.top;
  566.     else
  567.         return obj.style.pixelTop;
  568. }
  569.  
  570. CCSSP.GetObjectContainLeft = function(obj)
  571. {// retrieve the x coordinate of a posionable object relative to it's parent element
  572.     if( CCSSP.bIsNav4 )
  573.         return obj.pageX;
  574.     else
  575.     {
  576.         if( obj == document.body )
  577.             return obj.clientLeft;
  578.         else
  579.             return obj.offsetLeft;
  580.     }
  581. }
  582.  
  583. CCSSP.GetObjectWindowLeft = function(obj)
  584. {// retrieve the x coordinate of a posionable object relative to browser window
  585.     if( CCSSP.bIsNav4 )
  586.         return obj.pageX;
  587.     else
  588.     {
  589.         var nOffsetWindowLeft = 0;
  590.         for(var element = obj; element; element = element.offsetParent)
  591.             nOffsetWindowLeft += CCSSP.GetObjectContainLeft(element);
  592.         return nOffsetWindowLeft;
  593.     }
  594. }
  595.  
  596. CCSSP.GetObjectContainTop = function(obj)
  597. {// retrieve the y coordinate of a posionable object relative to it's parent element
  598.     if( CCSSP.bIsNav4 )
  599.         return obj.pageY;
  600.     else
  601.     {
  602.         if( obj == document.body )
  603.             return obj.clientTop;
  604.         else
  605.             return obj.offsetTop;
  606.     }
  607. }
  608.  
  609. CCSSP.GetObjectWindowTop = function(obj)
  610. {// retrieve the y coordinate of a posionable object relative to browser window
  611.     if( CCSSP.bIsNav4 )
  612.         return obj.pageY;
  613.     else
  614.     {
  615.         var nOffsetWindowTop = 0;
  616.         for(var element = obj; element; element = element.offsetParent)
  617.             nOffsetWindowTop += CCSSP.GetObjectContainTop(element);
  618.         return nOffsetWindowTop;
  619.     }
  620. }
  621.  
  622. CCSSP.GetObjectHeight = function(obj)
  623. {// retrieve the height of a posionable object
  624.     if( CCSSP.bIsNav4 )
  625.         return obj.clip.height;
  626.     else
  627.         return obj.offsetHeight;
  628. }
  629.  
  630. CCSSP.GetObjectWidth = function(obj)
  631. {// retrieve the width of a posionable object
  632.     if( CCSSP.bIsNav4 )
  633.         return obj.clip.width;
  634.     else
  635.         return obj.offsetWidth;
  636. }
  637.  
  638. CCSSP.RegisterEventHandler = function( srcObj, rawEventName, funcHandler )
  639. { // to add the "funcHandler" as the "rawEventName" 's handler to the "srcObj" object,the original event handler will be combined
  640.     if (CCSSP.bIsNav4 && !CCSSP.bIsNav6)
  641.         return ;
  642.     var oldHandler = "";
  643.     var oldInlineHandler = srcObj[rawEventName.toLowerCase()];
  644.     if( oldInlineHandler != null && typeof(oldInlineHandler) != "undefined")
  645.     {
  646.         var functionDefinition = oldInlineHandler.toString();
  647.         var bodyStart = functionDefinition.indexOf( "{" );
  648.         var bodyEnd = functionDefinition.lastIndexOf( "}" );
  649.         if( bodyStart > 0 || bodyEnd > bodyStart )
  650.             oldHandler = functionDefinition.substr( bodyStart + 1, bodyEnd - bodyStart - 2 );
  651.     }
  652.     else if( CCSSP.bIsIE4 )
  653.     { //search for <SCRIPT> tag which define the event handler
  654.         for( var i = 0; i < document.scripts.length; i++ ) 
  655.         {
  656.             var script = document.scripts[i];
  657.             if( (script.htmlFor == srcObj.id || script.htmlFor == srcObj ) && script.event == rawEventName )
  658.             {
  659.                 oldHandler = script.innerHTML;
  660.                 break;
  661.             }
  662.         }
  663.     }
  664.     
  665.     if( oldHandler.indexOf(funcHandler) >= 0 )
  666.         return;// to prevent register the funtion twice.
  667.  
  668.     if( CCSSP.bIsNav4 ) // only "onload, onresize, onfocus" apply to window
  669.     {// other raw events will apply to layer
  670.         var noOn = rawEventName.substring(2, rawEventName.length);
  671.         if( typeof(noOn) == "string" && noOn.length > 3 ) {
  672.             srcObj.captureEvents( Event[noOn.toUpperCase()] );
  673.         }
  674.     }
  675.  
  676.     var newHandler = oldHandler;
  677.     if( newHandler.length == 0 )
  678.         newHandler = funcHandler;
  679.     else
  680.         newHandler += "; " + funcHandler;
  681.     srcObj[rawEventName.toLowerCase()] = new Function( newHandler );
  682. }
  683.  
  684. CCSSP.GetWindowHeight = function()
  685. {// retrieve the height of available content in browser window
  686.     if( CCSSP.bIsNav4 )
  687.         return window.innerHeight;
  688.     else
  689.         return document.body.clientHeight;
  690. }
  691.  
  692. CCSSP.GetWindowBottom = function()
  693. {// retrieve the bottom postion of browser window
  694.     if( CCSSP.bIsNav4 )
  695.         return window.outerHeight + window.pageYOffset;
  696.     else
  697.         return document.body.clientHeight + document.body.scrollTop;
  698. }
  699.  
  700. CCSSP.GetWindowWidth = function()
  701. {// retrieve the width of available content in browser window
  702.     if( CCSSP.bIsNav4 )
  703.         return window.innerWidth;
  704.     else
  705.         return document.body.clientWidth;
  706. }
  707.  
  708. CCSSP.GetWindowRight = function()
  709. {// retrieve the right postion of browser window
  710.     if( CCSSP.bIsNav4 )
  711.         return window.outerWidth + window.pageXOffset;
  712.     else
  713.         return document.body.clientWidth + document.body.scrollLeft;
  714. }
  715.  
  716. CCSSP.TrimString = function( objString, subtrim )
  717. {// to trim the "subtrim" in the beginning and ending of a string object
  718.     if( typeof(subtrim) != "string" || subtrim == null )
  719.         return objString;
  720.     var strHead = objString.substring(0, 1);
  721.     var strRear = objString.substring(objString.length-1, objString.length);
  722.     if( strHead != subtrim && strRear != subtrim )
  723.         return objString;
  724.     
  725.     var spacePos = objString.indexOf(subtrim);
  726.     if( spacePos < 0 )
  727.         return objString;
  728.     else if( spacePos == objString.length - 1 )
  729.         return objString.substring(0, spacePos);
  730.     else
  731.     {
  732.         var newString = objString.substring( spacePos + 1, objString.length);
  733.         return CCSSP.TrimString( newString, subtrim );
  734.     }
  735. }
  736.  
  737. CCSSP.TrimSpace = function( objString )
  738. {
  739.     var Trim1 = CCSSP.TrimString( objString, " ");
  740.     return CCSSP.TrimString( Trim1, "\'");
  741. }
  742.  
  743. CCSSP.GetEventElement = function( navEventObject )
  744. {// to get the element who fired the current event
  745.     if(CCSSP.bIsNav4 ) 
  746.         if (CCSSP.bIsNav6)
  747.             return null;
  748.         else
  749.              navEventObject.target;
  750.     else
  751.         return event.srcElement;
  752. }
  753.  
  754. CCSSP.PrepareFilter = function( Obj )
  755. {//to prepare for making the filter work
  756.     Obj.style.filter = "";
  757.     if( Obj.style.width != "" || Obj.style.height != "" || Obj.style.position == "absolute" )
  758.         return;
  759.     Obj.style.height = CCSSP.GetObjectHeight(Obj);
  760. }
  761.  
  762. CCSSP.IsDescendant = function( progenitor, progeny )
  763. {
  764.     if( typeof(progeny) == "undefined" || progeny == null )
  765.         return false;
  766.     else if( progeny == progenitor )
  767.         return true; 
  768.     else if( progeny.id == progenitor.id ) 
  769.         return true; 
  770.     else if( progeny.parentElement == progenitor.parentElement )
  771.         return false;
  772.     else
  773.         return CCSSP.IsDescendant( progenitor, progeny.parentElement );
  774. }
  775.  
  776. CCSSP.IsTextTag = function( Obj )
  777. {
  778.     if( typeof( Obj.tagName ) == "undefined" )
  779.         return false;
  780.     return( Obj.tagName.indexOf("H") == 0 || Obj.tagName == "P" || 
  781.             Obj.tagName == "FONT" || Obj.tagName == "SPAN" );
  782. }
  783.  
  784. //End JavaScript libary for cross-platform positioning object.
  785.  
  786. /// Section End  - CCSSP DHTM (JavaScript 1.2)
  787.  
  788. /// Section Begin  - CCSSP DHTM 1 (JavaScript 1.2)
  789.  
  790. //Begin the definition of class CTrigger
  791. function CTrigger( TriggerElement )
  792. {
  793.     // object : the trigger element. Never be null. 
  794.     this.eleTrigger = TriggerElement;
  795.     
  796.     // number : the click counter number: only 3 values: 0,1,2;
  797.     this.nCounter = 0; 
  798.     
  799.     //object as associative array of string:
  800.     // the associate target ID strings; one element at least.            
  801.     this.objStrTarget = new Object();
  802.     this.eleTrigger.style.cursor = "hand";
  803.     if( this.eleTrigger.tagName == "AREA" && this.eleTrigger.getAttribute("href") == "" )
  804.         this.eleTrigger.setAttribute("href", "#") // to make a hand cursor for image map
  805. }
  806.  
  807. CTrigger.prototype.AddTargetID = function( strTargetID )
  808. {// add one target ID string to the objStrTarget
  809.     if( typeof(strTargetID) != "string" )
  810.         return ;
  811.     if( typeof(this.objStrTarget[strTargetID]) != "string" )
  812.         this.objStrTarget[strTargetID] = strTargetID;
  813. }
  814.  
  815. CTrigger.prototype.OnTriggerClick = function()
  816. {// to activate all asociated target
  817.     var strEventType = ( (this.nCounter++)% 2 == 0 ) ? 
  818.         "bssctrigger1" : "bssctrigger2";
  819.         
  820.     // to enumerate associative target element's ID string
  821.     for( var strTargetID in this.objStrTarget ) 
  822.         CEngine.SendEventToOneTarget( strTargetID, strEventType );
  823. }
  824. //End the definition of class CTrigger
  825.  
  826. //Begin the definition of class CTarget
  827. function CTarget( TargetElement )
  828. {
  829.     // object : the target element. Never be null.
  830.     this.eleTarget = TargetElement;
  831.     this.objManager = new Object(); // object: the event manager
  832.  
  833. CTarget.nPageClickCounter = 0;// static class property.
  834.  
  835. CTarget.prototype.GetAgencyObject = function(str_action_type,action_setting )
  836. {// return the action agency ( effect )object's refernece 
  837.     switch( str_action_type )
  838.     {
  839.     case "show":return new CAgencyShow( this.eleTarget, true ) ;
  840.     case "hide":return new CAgencyShow( this.eleTarget, false ) ;
  841.  
  842.     case "flyin" : 
  843.         return new CAgencyFly(this.eleTarget, action_setting, true);
  844.     case "flyout" : 
  845.         return new CAgencyFly(this.eleTarget, action_setting, false);
  846.     case "spiralin" : 
  847.         return new CAgencySpiral(this.eleTarget, action_setting, true);
  848.     case "spiralout" : 
  849.         return new CAgencySpiral(this.eleTarget, action_setting, false);
  850.     case "zoomin" :
  851.         return new CAgencyZoom(this.eleTarget, action_setting, true);
  852.     case "zoomout" : 
  853.         return new CAgencyZoom(this.eleTarget, action_setting, false);
  854.     case "elastic" : 
  855.         return new CAgencyElastic(this.eleTarget, action_setting);
  856.         
  857.     case "fadein" : 
  858.         return (CCSSP.bIsIE4)? new CAgencyAlpha(this.eleTarget, action_setting, true) : null;
  859.     case "fadeout" :
  860.         return (CCSSP.bIsIE4)? new CAgencyAlpha(this.eleTarget, action_setting, false) : null;
  861.     case "rockrollstatic" :
  862.     case "rockroll" :
  863.         return (CCSSP.bIsIE4)? new CAgencyWave(this.eleTarget, action_setting, false) : null;
  864.  
  865.     case "glow":
  866.         return (CCSSP.bIsIE4)? new CAgencyGlow(this.eleTarget,action_setting) : null;
  867.     case "dropshadow":
  868.         return (CCSSP.bIsIE4)? new CAgencyDropShadow(this.eleTarget,action_setting) : null;
  869.     case "transition" :
  870.         return (CCSSP.bIsIE4)? new CAgencyRevealTrans(this.eleTarget,action_setting) : null;
  871.     case "blur" :
  872.         return (CCSSP.bIsIE4)? new CAgencyBlur(this.eleTarget,action_setting) : null;
  873.  
  874.     case "fliph" : // all these 4 do NOT need any parameters
  875.     case "flipv" :
  876.     case "invert":
  877.     case "gray" :
  878.         return (CCSSP.bIsIE4)? new CAgencyChangeFilter(this.eleTarget, str_action_type) : null;
  879.     
  880.     case "fontchange": // the effects below change the style on the fly, so won't work in Navigator
  881.         return (CCSSP.bIsIE4)? new CAgencyFontChange(this.eleTarget,action_setting) : null;
  882.     case "boderchange": 
  883.     case "stylechange":
  884.         return (CCSSP.bIsIE4)? new CAgencyChangeStyle(this.eleTarget,action_setting) : null;
  885.  
  886.     default: return null;
  887.     }
  888. }
  889.  
  890. CTarget.prototype.SetEventManager = function( 
  891.     one_event_type,str_action_type,action_setting,event_additional)
  892. {// to set the event manager with specified action 
  893.     if( typeof( one_event_type ) != "string" ||    
  894.         typeof( str_action_type ) != "string"||
  895.         typeof( action_setting ) != "string" )
  896.         return false;
  897.     if( typeof(this.objManager[one_event_type]) == "undefined" )
  898.     {
  899.         this.objManager[one_event_type] = new Object();
  900.         this.objManager[one_event_type].length = 0;
  901.     }
  902.     
  903.     var eventAgency = this.GetAgencyObject(str_action_type,action_setting);
  904.     if( eventAgency != null )
  905.     {
  906.         var ct = this.objManager[one_event_type].length ++;
  907.         this.objManager[one_event_type][ct] = eventAgency;
  908.         
  909.         if( one_event_type == "bsscpageclick" )
  910.         {// to deal with the "number of pageclick" stuff
  911.             if( typeof(event_additional) == "number" )
  912.                 this.objManager[one_event_type][ct].nPageClick = event_additional;
  913.             else // set the default number 
  914.                 this.objManager[one_event_type][ct].nPageClick = 1;
  915.             
  916.             if( (typeof(this.objManager.nMinPageClickIndex) == "undefined") ||
  917.                 (this.objManager[one_event_type][ct].nPageClick < 
  918.                     this.objManager[one_event_type][this.objManager.nMinPageClickIndex].nPageClick) )
  919.                 this.objManager.nMinPageClickIndex = ct;
  920.         }
  921.         
  922.         //hide the object blindly,SetState function will take care of the final correct state
  923.         if( ((one_event_type == "bsscpageclick") && 
  924.              (this.objManager[one_event_type][ct].nPageClick == 1)) ||
  925.             one_event_type == "bsscpageload" ||
  926.             one_event_type == "bssctrigger1" )
  927.             CCSSP.ShowObject( this.eleTarget, false );
  928.         
  929.         if( one_event_type == "bssctrigger1" || one_event_type == "bssctrigger2" )
  930.             if( typeof( this.strTriggerEvent ) == "undefined" )
  931.                 this.strTriggerEvent = ( one_event_type == "bssctrigger1" ) ? "bssctrigger2" : "bssctrigger1";
  932.             
  933.         return true;
  934.     }
  935.     return false;
  936. }
  937.  
  938. CTarget.prototype.OnEvent = function( strBsscEvent )
  939. {// response to the event ( bssc format )
  940.     if( typeof(this.objManager[strBsscEvent]) == "object" )
  941.     { // to get the event agency from the event manager
  942.         var eventAgency = this.objManager[strBsscEvent];
  943.         for( var i = 0; i < eventAgency.length; i++ )
  944.         {
  945.             if( strBsscEvent == "bsscpageclick" && 
  946.                  eventAgency[i].nPageClick != CTarget.nPageClickCounter )
  947.                  continue;
  948.             else if( strBsscEvent == "bsschover" && event.type == "mouseout" )
  949.                 eventAgency[i].EndEffect();
  950.             else // to invoke the unified function in effect object    
  951.                 eventAgency[i].UpdateEffect(); 
  952.         }
  953.     }
  954. }
  955.  
  956. CTarget.prototype.SetState = function( strBsscEvent )
  957. {
  958.     if( typeof(this.objManager[strBsscEvent]) != "object" )
  959.         return false;
  960.  
  961.     // to get the event agency from the event manager
  962.     var eventAgency = this.objManager[strBsscEvent];
  963.     
  964.     if( strBsscEvent == "bsscpageclick" )
  965.     {// we only set the initial state for the minium number of pageclick 
  966.         eventAgency[this.objManager.nMinPageClickIndex].PrepareEffect();
  967.         return true;
  968.     }
  969.     else
  970.     {
  971.         for( var i = 0; i < eventAgency.length; i++ )
  972.             eventAgency[i].PrepareEffect(); // to invoke the unified function in effect object     
  973.         if( i > 0 )
  974.             return true;
  975.         else
  976.             return false;
  977.     }
  978. }
  979. //End the definition of class CTarget
  980.  
  981. //Begin the definition of CEngine class
  982. function CEngine(){}// all properities are going be "class" properities
  983.  
  984. // object : as associative array of trigger objects
  985. CEngine.objTrigger = new Object();
  986. // object : as associative array of target objects 
  987. CEngine.objTarget = new Object(); 
  988.  
  989. // Array : each element is a CAgencyXXX animation object
  990. CEngine.arrAnimation = new Array();
  991. CEngine.PerformAnimation = function( nIndex )
  992. {// animation : update effects function
  993.     CEngine.arrAnimation[nIndex].UpdateEffect();
  994. }
  995.  
  996. CEngine.AddOneTrigger = function(TriggerID,TriggerElement)
  997. {// add one Trigger object into the trigger array
  998.     if( typeof(TriggerID) != "string" || TriggerElement == null ||
  999.         typeof(TriggerElement) != "object" )
  1000.         return;
  1001.     if( typeof(CEngine.objTrigger[TriggerID] ) != "object" )
  1002.         CEngine.objTrigger[TriggerID] = new CTrigger(TriggerElement);
  1003. }
  1004.     
  1005. CEngine.AddOneTarget = function(TargetID, TargetElement)
  1006. {// add one Target object into the target array
  1007.     if( typeof(TargetID) != "string" || TargetElement == null ||
  1008.         typeof(TargetElement) != "object" )
  1009.         return;
  1010.     if( typeof(CEngine.objTarget[TargetID]) != "object" )
  1011.         CEngine.objTarget[TargetID] = new CTarget( TargetElement );
  1012. }
  1013.  
  1014. CEngine.SendEventToOneTarget = function(strTargetID, strBsscEvent )
  1015. {// to activate one target object
  1016.     if( typeof(CEngine.objTarget[strTargetID]) == "object" ) 
  1017.     {
  1018.         if( strBsscEvent == "bssctrigger1" || strBsscEvent == "bssctrigger2" )
  1019.         {//now, the "bssctrigger1" and "bssctrigger2" work like a toggle
  1020.             if( strBsscEvent == CEngine.objTarget[strTargetID].strTriggerEvent )
  1021.                 strBsscEvent = (strBsscEvent == "bssctrigger1") ? "bssctrigger2" : "bssctrigger1";
  1022.             CEngine.objTarget[strTargetID].strTriggerEvent = strBsscEvent;
  1023.         }
  1024.         CEngine.objTarget[strTargetID].OnEvent( strBsscEvent );
  1025.     }
  1026. }
  1027.  
  1028. CEngine.SendEventToAllTarget = function( strBsscEvent )
  1029. { //to activate all target associative to the BSSC event
  1030.     for( var strTargetID in CEngine.objTarget ) //to enumerate all target
  1031.         CEngine.SendEventToOneTarget( strTargetID, strBsscEvent );
  1032. }
  1033.  
  1034. CEngine.SetOneTargetInitialState = function( strTargetID )
  1035. {// only invoked after ALL effects for the target have been set
  1036.     if( typeof(CEngine.objTarget[strTargetID]) == "object" ) 
  1037.     {// to get target object
  1038.         var objTarget = CEngine.objTarget[strTargetID];
  1039.         if( objTarget.SetState( "bsscpageload" ) == false )
  1040.         {
  1041.             objTarget.SetState( "bsscpageclick" );
  1042.             objTarget.SetState( "bssctrigger1" );
  1043.         }
  1044.     }
  1045. }
  1046.  
  1047. CEngine.AdjustPageClickCounter = function()
  1048. {
  1049.     var nAdjustedClickCounter = CTarget.nPageClickCounter;
  1050.     var bAdjusted = false;
  1051.     for( var strTargetID in CEngine.objTarget ) //to enumerate all target
  1052.     {// try to find the minum pageCliclConter greater than CTarget.nPageClickCounter
  1053.         var objEventPageClick = CEngine.objTarget[strTargetID].objManager.bsscpageclick;
  1054.         if( objEventPageClick != null )
  1055.         {
  1056.             for( var i = 0; i < objEventPageClick.length; i++ )
  1057.             {
  1058.                 var nOtherPageClick = objEventPageClick[i].nPageClick;
  1059.                 if( nOtherPageClick == CTarget.nPageClickCounter )
  1060.                     return;
  1061.                 if( nOtherPageClick > CTarget.nPageClickCounter )
  1062.                 {
  1063.                     if( !bAdjusted )
  1064.                     {
  1065.                         nAdjustedClickCounter = nOtherPageClick;
  1066.                         bAdjusted = true;
  1067.                     }
  1068.                     else if( nOtherPageClick < nAdjustedClickCounter )
  1069.                         nAdjustedClickCounter = nOtherPageClick;
  1070.                 }
  1071.             }
  1072.         }
  1073.     }
  1074.     CTarget.nPageClickCounter = nAdjustedClickCounter;
  1075. }
  1076.  
  1077. CEngine.OnPageLoad = function()
  1078. {     
  1079.     // first, to set all target's initial state
  1080.     for( var strTargetID in CEngine.objTarget )
  1081.         CEngine.SetOneTargetInitialState( strTargetID );
  1082.     
  1083.     // to invoke all target's onpageload handler
  1084.     CEngine.SendEventToAllTarget( "bsscpageload" );
  1085. }
  1086.  
  1087. CEngine.OnPageClick = function()
  1088. { // to invoke all target's onpageclick handler
  1089.     var src = CCSSP.GetEventElement( arguments[0] );
  1090.     if( src == null )
  1091.         return;
  1092.         
  1093.     var objClickedTrigger = null;
  1094.     for( var strTriggerID in CEngine.objTrigger )
  1095.     { // to detect which trigger is clicked
  1096.         if( CCSSP.IsDescendant( CEngine.objTrigger[strTriggerID].eleTrigger,src) )
  1097.         {
  1098.             objClickedTrigger = CEngine.objTrigger[strTriggerID];
  1099.             break;
  1100.         }
  1101.     }
  1102.     
  1103.     if( objClickedTrigger != null) // the clicked trigger found
  1104.         objClickedTrigger.OnTriggerClick();
  1105.     else // no trigger is clicked
  1106.     { // to send PageClick event to all target
  1107.         CTarget.nPageClickCounter++;
  1108.         CEngine.AdjustPageClickCounter();
  1109.         CEngine.SendEventToAllTarget( "bsscpageclick" );
  1110.     }
  1111. }    
  1112.  
  1113. CEngine.OnMouseOver = function()
  1114. { // to invoke all target's onpageload handler
  1115.     var src = CCSSP.GetEventElement( arguments[0] );
  1116.     if( src == null )
  1117.         return;
  1118.         
  1119.     var strHoveredTargetID = null;
  1120.     for( var strTargetID in CEngine.objTarget )
  1121.     { // to detect which Target is hovering on
  1122.         if( CCSSP.IsDescendant( CEngine.objTarget[strTargetID].eleTarget, src ) )
  1123.         {
  1124.             strHoveredTargetID = strTargetID;
  1125.             break;
  1126.         }
  1127.     }
  1128.     
  1129.     if( strHoveredTargetID != null ) // the hovered target found
  1130.         CEngine.SendEventToOneTarget( strHoveredTargetID, "bsschover" );
  1131. }
  1132.  
  1133. CEngine.BuildTargetObject = function(target_ID,event_type,action_type,
  1134.             action_setting, event_additional)
  1135. {// to build target object 
  1136.     // to get the target object
  1137.     if( typeof( CEngine.objTarget[target_ID] ) != "object" )
  1138.         return false;// the engine's AddOneTarget function might have failed.
  1139.     var TargetObject = CEngine.objTarget[target_ID];
  1140.     
  1141.     // to prepare the parameters for the event manager
  1142.     var arrEvent = event_type.split("|"); // to split the combined event_type string
  1143.     var arrAction = action_type.split("|");//to split the combined action_type string
  1144.     for( var trim = 0; trim < arrEvent.length; trim++ )
  1145.         arrEvent[trim] = CCSSP.TrimSpace(arrEvent[trim]);
  1146.     
  1147.     for( trim = 0; trim < arrAction.length; trim++ )
  1148.         arrAction[trim] = CCSSP.TrimSpace(arrAction[trim]);
  1149.     
  1150.     var arrSetting = new Array(); 
  1151.     if( typeof(action_setting) == "string" )
  1152.         arrSetting = action_setting.split("|");// to split the combined action_setting string
  1153.     // to calibrate the arrays
  1154.     for( var i = arrSetting.length; i < arrAction.length; i++ )
  1155.     {
  1156.         if( typeof(arrSetting[i]) != "string" )
  1157.              arrSetting[i] = "";
  1158.     }                 
  1159.  
  1160.     // to prepare for dealing with the absolute posioning element
  1161.     TargetObject.eleTarget.ABSX = CCSSP.GetObjectLeft( TargetObject.eleTarget );
  1162.     TargetObject.eleTarget.ABSY = CCSSP.GetObjectTop( TargetObject.eleTarget );
  1163.  
  1164.     if( arrEvent.length > 1 )
  1165.     {// if event is combined, it must be : "bssctrigger1 | bssctrigger2"
  1166.         if( arrAction.length != 2 )
  1167.             return false; // if event is combined, there must be 2 actions
  1168.         for( i = 0 ; i < 2; i++ )
  1169.         {
  1170.             if( TargetObject.SetEventManager(arrEvent[i], arrAction[i], 
  1171.                 arrSetting[i], event_additional) == false )
  1172.                 return false; // the event manager has not been set up
  1173.         }
  1174.     }
  1175.     else // the event_type string is not combined
  1176.     {
  1177.         for( i = 0 ; i < arrAction.length; i++ )
  1178.         {
  1179.             TargetObject.SetEventManager(event_type, arrAction[i], arrSetting[i], event_additional);
  1180.             // to validate the event manager
  1181.             if( typeof(TargetObject.objManager[event_type]) != "object" ||
  1182.                     typeof(TargetObject.objManager[event_type][i]) != "object" )
  1183.                 return false; // the event manager has not been set up
  1184.         }
  1185.     }
  1186.     return true;
  1187. }
  1188.  
  1189. CEngine.BuildTriggerObject = function(trigger_ID, target_ID)
  1190. {// to build the trigger object
  1191.     var arrTrigger = trigger_ID.split("|"); // to split the combined trigger_ID string
  1192.     for( var i = 0; i < arrTrigger.length; i ++ )
  1193.     {// to get the trigger element then add it to the trigger list
  1194.         arrTrigger[i] = CCSSP.TrimSpace( arrTrigger[i] );
  1195.         var eleTrigger = CCSSP.GetObject( arrTrigger[i] );
  1196.         if( eleTrigger == null )
  1197.             continue; // the trigger_ID string in the HTML code maybe wrong
  1198.         CEngine.AddOneTrigger( arrTrigger[i], eleTrigger );
  1199.  
  1200.         // to get the target object
  1201.         if( typeof( this.objTrigger[arrTrigger[i]] ) != "object" )
  1202.             continue;// the engine's AddOneTarget function might have failed.
  1203.         CEngine.objTrigger[arrTrigger[i]].AddTargetID( target_ID );
  1204.     }
  1205. }
  1206. //End the definition of CEngine class
  1207.  
  1208. /// Section End  - CCSSP DHTM 1 (JavaScript 1.2)
  1209.  
  1210. /// Section Begin  - CCSSP DHTM 2 (JavaScript 1.2)
  1211.  
  1212. //Begin the definition of CAgencyXXXX classes
  1213.  
  1214. //Begin of the CAgencyShow definition
  1215. function CAgencyShow( element, bIsShow )
  1216. {
  1217.     this.ele = element;
  1218.     this.bIsShow = bIsShow;
  1219. }
  1220.  
  1221. CAgencyShow.prototype.PrepareEffect = function()
  1222. {
  1223.     CCSSP.ShowObject( this.ele, !this.bIsShow );
  1224. }
  1225.  
  1226. CAgencyShow.prototype.UpdateEffect = function()
  1227. {
  1228.     CCSSP.ShowObject( this.ele, this.bIsShow );
  1229. }
  1230.  
  1231. CAgencyShow.prototype.EndEffect = function()
  1232. {
  1233.     CCSSP.ShowObject( this.ele, !this.bIsShow );
  1234. }
  1235. // End of the CAgencyShow definition
  1236.  
  1237. // Begin of CAgencyFly definition
  1238. function CAgencyFly( element, settings, bIsIn )
  1239. {
  1240.     this.ele = element;
  1241.     this.bIsIn = bIsIn;
  1242.     this.duration = 1000; // default
  1243.     this.direction = "right";
  1244.  
  1245.     var arrAllSet = settings.split(",");
  1246.     for( var i = 0; i < arrAllSet.length; i ++ )
  1247.     {// to retrieve the setting
  1248.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1249.         var arrOneSet = arrAllSet[i].split("=");
  1250.         for( var j = 0; j < arrOneSet.length; j++ )
  1251.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1252.         switch( arrOneSet[0] )
  1253.         {
  1254.         case "speed" : this.duration = 100000/arrOneSet[1]; break;
  1255.         case "direction" : this.direction = arrOneSet[1]; break;
  1256.         }
  1257.     }
  1258.         
  1259.     if( CCSSP.bIsIE5 && this.ele.style.position != "absolute" )
  1260.         this.ele.style.position = "relative";
  1261.     this.timer = null;
  1262.     this.aniIndex = CEngine.arrAnimation.length;
  1263.     CEngine.arrAnimation[this.aniIndex] = this;
  1264. }
  1265.  
  1266. CAgencyFly.prototype.PrepareEffect = function()
  1267. {
  1268.     CCSSP.ShowObject(this.ele, !this.bIsIn );
  1269. }
  1270.  
  1271. CAgencyFly.prototype.UpdateEffect = function()
  1272. {
  1273.     if( this.timer == null )
  1274.         this.ResetParameters();
  1275.  
  1276.     var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  1277.     if( percent >= 1.0 )
  1278.         this.EndEffect();
  1279.     else
  1280.     {
  1281.         var newX = this.startX*(1.0-percent) +  this.finalX*percent;
  1282.         var newY = this.startY*(1.0-percent) +  this.finalY*percent;
  1283.         CCSSP.MoveObjectTo(this.ele, newX, newY);
  1284.         if( this.timer == null )
  1285.             this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 20 );
  1286.     }
  1287. }
  1288.  
  1289. CAgencyFly.prototype.EndEffect = function()
  1290. {
  1291.     clearInterval( this.timer );
  1292.     this.timer = null;
  1293.  
  1294.     if( this.bIsIn ) // FlyIn
  1295.         CCSSP.MoveObjectTo(this.ele, this.finalX, this.finalY);
  1296.     else // FlyOut
  1297.         CCSSP.MoveObjectTo(this.ele, this.startX, this.startY);
  1298.     CCSSP.ShowObject(this.ele, this.bIsIn );
  1299. }
  1300.  
  1301. CAgencyFly.prototype.ResetParameters = function()
  1302. {
  1303.     this.PrepareEffect();
  1304.     CCSSP.ShowObject(this.ele, true );
  1305.  
  1306.     this.startX = 0;
  1307.     this.startY = 0;
  1308.     this.finalX = 0;
  1309.     this.finalY = 0; 
  1310.     
  1311.     var offsetLeft = CCSSP.GetObjectWindowLeft(this.ele) + this.ele.offsetWidth;
  1312.     var offsetTop = CCSSP.GetObjectWindowTop(this.ele) + this.ele.offsetHeight;
  1313.     var offsetRight = CCSSP.GetWindowRight();
  1314.     var offsetBottom = CCSSP.GetWindowBottom();
  1315.  
  1316.     if( this.bIsIn )
  1317.     { // FlyIn
  1318.         this.finalX = this.ele.ABSX;
  1319.         this.finalY = this.ele.ABSY;
  1320.  
  1321.         switch( this.direction )
  1322.         {
  1323.         case "right": this.startX = offsetRight; this.startY = this.finalY; break;
  1324.         case "left": this.startX = -offsetLeft;  this.startY = this.finalY; break;
  1325.         case "down": this.startY = offsetBottom; this.startX = this.finalX; break;
  1326.         case "up":  this.startY = -offsetTop;    this.startX = this.finalX; break;
  1327.         case "downright":
  1328.               this.startX = ( offsetBottom < offsetRight) ? offsetBottom : offsetRight;
  1329.             this.startY = this.startX;        break;
  1330.         case "upright":
  1331.               this.startX = (offsetTop < offsetRight)? offsetTop : offsetRight;
  1332.             this.startY = -this.startX;        break;
  1333.         case "upleft":
  1334.             this.startX = -((offsetTop < offsetRight)? offsetTop : offsetRight);
  1335.             this.startY = this.startX;        break;
  1336.         case "downleft":
  1337.             this.startX = -(( offsetBottom < offsetRight) ? offsetBottom : offsetRight);
  1338.             this.startY = -this.startX;     break;
  1339.         }
  1340.     }
  1341.     else
  1342.     { // FlyOut
  1343.         this.startX = this.ele.ABSX;
  1344.         this.startY = this.ele.ABSY;
  1345.  
  1346.         switch( this.direction )
  1347.         {
  1348.         case "right": this.finalX = offsetRight;  this.finalY = this.startY; break;
  1349.         case "left": this.finalX = -offsetLeft;   this.finalY = this.startY;  break;
  1350.         case "down": this.finalY = offsetBottom;  this.finalX = this.startX; break;
  1351.         case "up":  this.finalY = -offsetTop;     this.finalX = this.startX; break;
  1352.         case "downright":
  1353.               this.finalX = ( offsetBottom < offsetRight) ? offsetBottom : offsetRight;
  1354.             this.finalY = this.finalX;        break;
  1355.         case "upright":
  1356.               this.finalX = (offsetTop < offsetRight)? offsetTop : offsetRight;
  1357.             this.finalY = -this.finalX;        break;
  1358.         case "upleft":
  1359.             this.finalX = -((offsetTop < offsetRight)? offsetTop : offsetRight);
  1360.             this.finalY = this.finalX;        break;
  1361.         case "downleft":
  1362.             this.finalX = -(( offsetBottom < offsetRight) ? offsetBottom : offsetRight);
  1363.             this.finalY = -this.finalX;     break;
  1364.         }
  1365.     }
  1366.     CCSSP.MoveObjectTo(this.ele, this.startX, this.startY);
  1367.     this.startTime = (new Date()).getTime();
  1368. }
  1369. // End of the CAgencyFly definition
  1370.  
  1371. // Begin of CAgencySpiral
  1372. function CAgencySpiral( element, settings, bIsIn )
  1373. {
  1374.     this.ele = element;
  1375.     this.bIsIn = bIsIn;
  1376.     this.duration = 1000; // default
  1377.  
  1378.     var arrAllSet = settings.split(",");
  1379.     for( var i = 0; i < arrAllSet.length; i ++ )
  1380.     {// to retrieve the setting
  1381.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1382.         var arrOneSet = arrAllSet[i].split("=");
  1383.         for( var j = 0; j < arrOneSet.length; j++ )
  1384.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1385.         switch( arrOneSet[0] )
  1386.         {
  1387.         case "speed" : this.duration = 100000/arrOneSet[1]; break;
  1388.         }
  1389.     }
  1390.  
  1391.     if( CCSSP.bIsIE5 && this.ele.style.position != "absolute" )
  1392.         this.ele.style.position = "relative";
  1393.     this.timer = null;
  1394.     this.aniIndex = CEngine.arrAnimation.length;
  1395.     CEngine.arrAnimation[this.aniIndex] = this;
  1396. }
  1397.  
  1398. CAgencySpiral.prototype.PrepareEffect = function()
  1399. {
  1400.     CCSSP.ShowObject(this.ele, !this.bIsIn );
  1401. }
  1402.  
  1403. CAgencySpiral.prototype.UpdateEffect = function()
  1404. {
  1405.     if( this.timer == null )
  1406.         this.ResetParameters();
  1407.  
  1408.     var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  1409.     if( percent >= 1.0 )
  1410.         this.EndEffect();
  1411.     else
  1412.     {
  1413.         var rf = (this.bIsIn)? (1.0 - percent) : percent; 
  1414.         var t = (1.0-rf) * 4.0 * Math.PI
  1415.         var rxP = (this.bIsIn)? this.startX : this.finalX; 
  1416.         var ryP = (this.bIsIn)? this.startY : this.finalY; 
  1417.         var rx = (Math.abs(rxP) < 200) ? Math.abs(rxP) : 200;
  1418.         var ry = (Math.abs(ryP) < 200) ? Math.abs(ryP) : 200;
  1419.  
  1420.         var newX = Math.ceil(-rf*Math.cos(t)*rx) + this.ele.ABSX;
  1421.         var newY = Math.ceil(-rf*Math.sin(t)*ry) + this.ele.ABSY;
  1422.         CCSSP.MoveObjectTo(this.ele, newX, newY);
  1423.         if( this.timer == null )
  1424.             this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 20 );
  1425.     }
  1426. }
  1427.  
  1428. CAgencySpiral.prototype.EndEffect = function()
  1429. {
  1430.     clearInterval( this.timer );
  1431.     this.timer = null;
  1432.     
  1433.     if( this.bIsIn ) // In
  1434.         CCSSP.MoveObjectTo(this.ele, this.finalX, this.finalY);
  1435.     else // Out
  1436.         CCSSP.MoveObjectTo(this.ele, this.startX, this.startY);
  1437.     CCSSP.ShowObject(this.ele, this.bIsIn );
  1438. }
  1439.  
  1440. CAgencySpiral.prototype.ResetParameters = function()
  1441. {
  1442.     this.PrepareEffect();
  1443.     CCSSP.ShowObject(this.ele, true );
  1444.     this.startX = (this.bIsIn)? CCSSP.GetWindowRight() : this.ele.ABSX;
  1445.     this.startY = (this.bIsIn)? CCSSP.GetWindowBottom() : this.ele.ABSY;
  1446.     this.finalX = (this.bIsIn)? this.ele.ABSX : CCSSP.GetWindowRight();
  1447.     this.finalY = (this.bIsIn)? this.ele.ABSY : CCSSP.GetWindowBottom(); 
  1448.     
  1449.     CCSSP.MoveObjectTo(this.ele, this.startX, this.startY);
  1450.     this.startTime = (new Date()).getTime();
  1451. }
  1452. // End of CAgencySpiral
  1453.  
  1454. // Begin of CAgencyElastic
  1455. function CAgencyElastic( element, settings)
  1456. {
  1457.     this.ele = element;
  1458.     this.duration = 1000; // default
  1459.     this.direction = "right";
  1460.  
  1461.     var arrAllSet = settings.split(",");
  1462.     for( var i = 0; i < arrAllSet.length; i ++ )
  1463.     {// to retrieve the setting
  1464.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1465.         var arrOneSet = arrAllSet[i].split("=");
  1466.         for( var j = 0; j < arrOneSet.length; j++ )
  1467.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1468.         switch( arrOneSet[0] )
  1469.         {
  1470.         case "speed" : this.duration = 100000/arrOneSet[1]; break;
  1471.         case "direction" : this.direction = arrOneSet[1]; break;
  1472.         }
  1473.     }
  1474.         
  1475.     if( CCSSP.bIsIE5 && this.ele.style.position != "absolute" )
  1476.         this.ele.style.position = "relative";
  1477.     this.timer = null;
  1478.     this.aniIndex = CEngine.arrAnimation.length;
  1479.     CEngine.arrAnimation[this.aniIndex] = this;
  1480. }
  1481.  
  1482. CAgencyElastic.prototype.PrepareEffect = function()
  1483. {
  1484.     CCSSP.ShowObject(this.ele, false );
  1485. }
  1486.  
  1487. CAgencyElastic.prototype.UpdateEffect = function()
  1488. {
  1489.     if( this.timer == null )
  1490.         this.ResetParameters();
  1491.  
  1492.     var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  1493.     if( percent >= 1.0 )
  1494.         this.EndEffect();
  1495.     else
  1496.     {
  1497.         var newX = this.startX;
  1498.         var newY = this.startY;
  1499.         var rf = Math.exp(-percent*3);
  1500.         var t = percent * 1.5 * Math.PI
  1501.         var rx = (Math.abs(this.startX) > Math.abs(this.startY)) ? this.startX : this.startY;
  1502.         switch (this.direction )
  1503.         {
  1504.         case "left":   
  1505.         case "right" : newX = rf*Math.cos(t)*rx + this.ele.ABSX; break;
  1506.         case "up":       
  1507.         case "down" :  newY = rf*Math.cos(t)*rx + this.ele.ABSX; break;
  1508.         }
  1509.         CCSSP.MoveObjectTo(this.ele, newX, newY);
  1510.         if( this.timer == null )
  1511.             this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 20 );
  1512.     }
  1513. }
  1514.  
  1515. CAgencyElastic.prototype.EndEffect = function()
  1516. {
  1517.     CCSSP.MoveObjectTo(this.ele, this.finalX, this.finalY);
  1518.     clearInterval( this.timer );
  1519.     this.timer = null;
  1520. }
  1521.  
  1522. CAgencyElastic.prototype.ResetParameters = function()
  1523. {
  1524.     CCSSP.ShowObject(this.ele, true );
  1525.     this.startX = this.ele.ABSX;
  1526.     this.finalX = this.ele.ABSX;
  1527.     this.startY = this.ele.ABSY;
  1528.     this.finalY = this.ele.ABSY;
  1529.     
  1530.     switch (this.direction)
  1531.     { 
  1532.     case "left":  this.startX = -this.ele.offsetWidth; break;
  1533.     case "right": this.startX = this.ele.offsetWidth;  break;
  1534.     case "up":    this.startY = -this.ele.offsetHeight;break;
  1535.     case "down":  this.startY = this.ele.offsetHeight; break;
  1536.     }
  1537.     CCSSP.MoveObjectTo(this.ele, this.startX, this.startY);
  1538.     this.startTime = (new Date()).getTime();
  1539. }
  1540. // End of CAgencyElastic
  1541.  
  1542. // Begin of CAgencyZoom
  1543. function CAgencyZoom( element, settings, bIsIn)
  1544. {
  1545.     this.ele = element;
  1546.     this.duration = 1000; // default
  1547.     
  1548.     var arrAllSet = settings.split(",");
  1549.     for( var i = 0; i < arrAllSet.length; i ++ )
  1550.     {// to retrieve the setting
  1551.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1552.         var arrOneSet = arrAllSet[i].split("=");
  1553.         for( var j = 0; j < arrOneSet.length; j++ )
  1554.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1555.         switch( arrOneSet[0] )
  1556.         {
  1557.         case "speed" : this.duration = 100000/arrOneSet[1]; break;
  1558.         }
  1559.     }
  1560.  
  1561.     this.bIsIn = bIsIn;
  1562.     this.timer = null;
  1563.     this.aniIndex = CEngine.arrAnimation.length;
  1564.     CEngine.arrAnimation[this.aniIndex] = this;
  1565. }
  1566.  
  1567. CAgencyZoom.prototype.PrepareEffect = function()
  1568. {
  1569.     CCSSP.ShowObject(this.ele, false);
  1570. }
  1571.  
  1572. CAgencyZoom.prototype.UpdateEffect = function()
  1573. {
  1574.     if( this.timer == null )
  1575.         this.ResetParameters();
  1576.  
  1577.     var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  1578.     if( percent >= 1.0 )
  1579.         this.EndEffect();
  1580.     else
  1581.     {
  1582.         var nFactorIn = Math.ceil(50+50*percent);
  1583.         var nFactorOut = Math.ceil(100+200*(1-percent));
  1584.         var AlterFontsize = ((this.bIsIn)? nFactorIn : nFactorOut) + "%";
  1585.         var AlterFactor = ((this.bIsIn)? nFactorIn : nFactorOut) / 100;
  1586.         
  1587.         this.UpdateEffectAllChildren(this.ele, AlterFontsize, AlterFactor);
  1588.         for(var index = 0; index < this.ele.all.length; index++)
  1589.             this.UpdateEffectAllChildren(this.ele.all[index], AlterFontsize, AlterFactor);
  1590.             
  1591.         if( this.timer == null )
  1592.             this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 20 );
  1593.     }
  1594. }
  1595.  
  1596. CAgencyZoom.prototype.UpdateEffectAllChildren = function(child, FontSize, Factor)
  1597. {
  1598.     if( CCSSP.IsTextTag(child) )
  1599.         child.style.fontSize = FontSize;
  1600.     else
  1601.     {
  1602.         if( typeof(child.orgWidth) == "number" )
  1603.             child.style.width = Factor * child.orgWidth;
  1604.         if( typeof(child.orgHeight) == "number" )
  1605.             child.style.height = Factor * child.orgHeight;
  1606.     }
  1607. }
  1608.  
  1609. CAgencyZoom.prototype.EndEffect = function()
  1610. {
  1611.     this.EndEffectAllChildren(this.ele);
  1612.     for(var index = 0; index < this.ele.all.length; index++)
  1613.         this.EndEffectAllChildren(this.ele.all[index]);
  1614.     
  1615.     clearInterval( this.timer );
  1616.     this.timer = null;
  1617. }
  1618.  
  1619. CAgencyZoom.prototype.EndEffectAllChildren = function( child )
  1620. {    
  1621.     if( CCSSP.IsTextTag(child) )
  1622.         child.style.fontSize = child.orgFontSize;
  1623.     else
  1624.     {
  1625.         if( typeof(child.intactWidth) != "undefined" )
  1626.         {
  1627.             child.width = child.intactWidth;
  1628.             child.height = child.intactHeight;
  1629.         }
  1630.         else if( typeof(child.style.intactPixelWidth) != "undefined" )
  1631.         {
  1632.             child.style.pixelWidth = child.style.intactPixelWidth;
  1633.             child.style.pixelHeight = child.style.intactPixelHeight;
  1634.         }
  1635.     }
  1636. }
  1637.  
  1638. CAgencyZoom.prototype.ResetParameters = function()
  1639. {
  1640.     this.PrepareEffect();
  1641.     this.ResetParametersAllChildren( this.ele );
  1642.     for(var index = 0; index < this.ele.all.length; index++)
  1643.         this.ResetParametersAllChildren(this.ele.all[index]);
  1644.         
  1645.     this.startTime = (new Date()).getTime();
  1646. }
  1647.  
  1648. CAgencyZoom.prototype.ResetParametersAllChildren = function( child )
  1649. {
  1650.     CCSSP.ShowObject(child, true );
  1651.     if( (child.tagName == "DIV") && (child.parentElement.tagName == "TD") )
  1652.         child.width = "100%";// if the div is inside a cell of table, we need the this hack
  1653.     
  1654.     if( CCSSP.IsTextTag(child) )
  1655.         child.orgFontSize = child.style.fontSize;
  1656.     else
  1657.     {
  1658.         if( child.width > "" || child.height > "" )
  1659.         {
  1660.             child.orgWidth = child.intactWidth = child.width;
  1661.             child.orgHeight = child.intactHeight = child.height;
  1662.         }
  1663.         else if( ( typeof(child.orgWidth) != "number" ) && (typeof(child.orgHeight) != "number") )
  1664.         {
  1665.             child.orgWidth = child.style.intactPixelWidth = child.style.pixelWidth;
  1666.             child.orgHeight = child.style.intactPixelHeight = child.style.pixelHeight;
  1667.         }
  1668.     }
  1669. }
  1670. // End of CAgencyZoom
  1671.  
  1672. //// the following effects will use IE's exclusive "filter" function ////
  1673. // Begin of CAgencyAlpha definition
  1674. function CAgencyAlpha( element, settings, bIsIn )
  1675. {// because of "visual filter" style, this won't work in Navigator
  1676.     this.ele = element;
  1677.     this.bIsIn = bIsIn;
  1678.  
  1679.     // to set the default value
  1680.     this.startOpacity = (this.bIsIn) ? 0 : 100;
  1681.     this.endOpacity = (this.bIsIn) ? 100 : 0;
  1682.     
  1683.     this.duration = 1000; // default
  1684.     
  1685.     var arrAllSet = settings.split(",");
  1686.     for( var i = 0; i < arrAllSet.length; i ++ )
  1687.     {// to retrieve the setting
  1688.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1689.         var arrOneSet = arrAllSet[i].split("=");
  1690.         for( var j = 0; j < arrOneSet.length; j++ )
  1691.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1692.         switch( arrOneSet[0] )
  1693.         {
  1694.         case "speed" : this.duration = 100000/arrOneSet[1]; break;
  1695.         }
  1696.     }
  1697.     
  1698.     this.timer = null;
  1699.     this.aniIndex = CEngine.arrAnimation.length;
  1700.     CEngine.arrAnimation[this.aniIndex] = this;
  1701. }
  1702.  
  1703. CAgencyAlpha.prototype.PrepareEffect = function()
  1704. {// to set the visual filter function
  1705.     // the visual filter ONLY work when set by "Width and Height" or
  1706.     // absolute position for DIV, SPAN and normal tag ( such as p )
  1707.     // but, "absolute" cause the following elements overlap, so:
  1708.     CCSSP.PrepareFilter( this.ele );
  1709.     CCSSP.ShowObject(this.ele, !this.bIsIn );
  1710. }
  1711.  
  1712. CAgencyAlpha.prototype.UpdateEffect = function()
  1713. {// to set the visual filter function
  1714.     if( this.timer == null )
  1715.         this.ResetParameters();
  1716.     if( typeof(this.ele.filters.alpha) != "object" )
  1717.     {
  1718.         this.EndEffect();
  1719.         return;
  1720.     }
  1721.  
  1722.     var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  1723.     if( percent >= 1.0 )
  1724.         this.EndEffect();
  1725.     else if( typeof(this.ele.filters.alpha) == "object" )
  1726.     {
  1727.         this.ele.filters.alpha.opacity = this.startOpacity*(1.0-percent) + this.endOpacity*percent;
  1728.         if( this.timer == null )
  1729.             this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 20 );
  1730.     }
  1731. }
  1732.  
  1733. CAgencyAlpha.prototype.EndEffect = function()
  1734. {// to remove the visual filter function
  1735.     clearInterval( this.timer );
  1736.     this.timer = null;
  1737.     this.ele.style.filter = "";
  1738.     CCSSP.ShowObject(this.ele, this.bIsIn );
  1739. }
  1740.  
  1741. CAgencyAlpha.prototype.ResetParameters = function()
  1742. {
  1743.     this.PrepareEffect();
  1744.     CCSSP.ShowObject(this.ele, true );
  1745.     this.ele.style.filter = "alpha(opacity=" + this.startOpacity + ")";
  1746.     this.startTime = (new Date()).getTime();
  1747. }
  1748. // End of the CAgencyAlpha definition
  1749.  
  1750. // Begin of CAgencyWave definition
  1751. function CAgencyWave( element, settings )
  1752. {// because of "visual filter" style, this won't work in Navigator
  1753.     this.ele = element;
  1754.  
  1755.     this.duration = 0; // default
  1756.     this.strength = 10;
  1757.     this.freq = 1;
  1758.     this.lightstrength = 1;
  1759.     
  1760.     var arrAllSet = settings.split(",");
  1761.     for( var i = 0; i < arrAllSet.length; i ++ )
  1762.     {// to retrieve the setting
  1763.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1764.         var arrOneSet = arrAllSet[i].split("=");
  1765.         for( var j = 0; j < arrOneSet.length; j++ )
  1766.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1767.         switch( arrOneSet[0] )
  1768.         {
  1769.         case "duration" : this.duration = 100000/arrOneSet[1]; break;
  1770.         case "strength" : this.strength = arrOneSet[1]; break;
  1771.         case "freq" : this.freq = arrOneSet[1]; break;
  1772.         case "lightstrength" : this.lightstrength = arrOneSet[1]; break;
  1773.         }
  1774.     }
  1775.  
  1776.     this.timer = null;
  1777.     this.aniIndex = CEngine.arrAnimation.length;
  1778.     CEngine.arrAnimation[this.aniIndex] = this;
  1779. }
  1780.  
  1781. CAgencyWave.prototype.PrepareEffect = function()
  1782. {// to set the visual filter function
  1783.     CCSSP.PrepareFilter(this.ele);
  1784.  
  1785.     CCSSP.ShowObject(this.ele, true );
  1786. }
  1787.  
  1788. CAgencyWave.prototype.UpdateEffect = function()
  1789. {// to set the visual filter function
  1790.     if( this.timer == null )
  1791.         this.ResetParameters();
  1792.     if( typeof(this.ele.filters.wave) != "object" )
  1793.     {
  1794.         this.EndEffect();
  1795.         return;
  1796.     }
  1797.  
  1798.     if( this.duration > 0 )
  1799.     {
  1800.         var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  1801.         if( percent >= 1.0 )
  1802.         {
  1803.             this.EndEffect();
  1804.             return;
  1805.         }
  1806.     }
  1807.     
  1808.     this.ele.filters.wave.phase += 5;
  1809.     this.ele.filters.wave.phase %= 100;
  1810.     if( this.timer == null )
  1811.         this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 50 );
  1812. }
  1813.  
  1814. CAgencyWave.prototype.EndEffect = function()
  1815. {// to remove the visual filter function
  1816.     this.ele.style.filter = "";
  1817.     clearInterval( this.timer );
  1818.     this.timer = null;
  1819. }
  1820.  
  1821. CAgencyWave.prototype.ResetParameters = function()
  1822. {
  1823.     this.PrepareEffect();
  1824.     this.ele.style.filter = "wave(strength=" + this.strength + ",freq=" + 
  1825.      this.freq +", lightstrength=" + this.lightstrength +",phase=0);";
  1826.     this.startTime = (new Date()).getTime();
  1827. }
  1828. // End of the CAgencyWave definition
  1829.  
  1830. // Begin of CAgencyGlow definition
  1831. function CAgencyGlow( element, settings )
  1832. {// because of "visual filter" style, this won't work in Navigator
  1833.     this.ele = element;
  1834.  
  1835.     // to set the default value
  1836.     this.glowColor = "green";
  1837.     this.glowStrength = "3";
  1838.     
  1839.     var arrAllSet = settings.split(",");
  1840.     for( var i = 0; i < arrAllSet.length; i ++ )
  1841.     {
  1842.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1843.         var arrOneSet = arrAllSet[i].split("=");
  1844.         for( var j = 0; j < arrOneSet.length; j++ )
  1845.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1846.         switch( arrOneSet[0] )
  1847.         {
  1848.         case "color" : this.glowColor = arrOneSet[1]; break;
  1849.         case "strength" : this.glowStrength = arrOneSet[1]; break;
  1850.         }
  1851.     }
  1852. }
  1853.  
  1854. CAgencyGlow.prototype.PrepareEffect = function()
  1855. {
  1856.     CCSSP.PrepareFilter(this.ele);
  1857.     CCSSP.ShowObject(this.ele, true );
  1858.     if( this.ele.style.backgroundColor != "" )
  1859.     {//style.backgroundColor somehow stop the visual filter
  1860.         this.ele.intactBackgroundColor = this.ele.style.backgroundColor;
  1861.         this.ele.style.backgroundColor = "";
  1862.     }
  1863. }
  1864.  
  1865. CAgencyGlow.prototype.UpdateEffect = function()
  1866. {// to set the visual filter function
  1867.     this.PrepareEffect();
  1868.     this.ele.style.filter = "glow(Color=" + this.glowColor + ", Strength=" + 
  1869.         this.glowStrength + ", enabled=true" +")";
  1870. }
  1871.  
  1872. CAgencyGlow.prototype.EndEffect = function()
  1873. {// to remove the visual filter function
  1874.     this.ele.style.filter = "";
  1875.     if( typeof(this.ele.intactBackgroundColor) != "undefined" )
  1876.         this.ele.style.backgroundColor = this.ele.intactBackgroundColor;
  1877. }
  1878. // End of the CAgencyGlow definition
  1879.  
  1880. // Begin of CAgencyDropShadow definition
  1881. function CAgencyDropShadow( element, settings )
  1882. {// because of "visual filter" style, this won't work in Navigator
  1883.     this.ele = element;
  1884.  
  1885.     // to set the default value
  1886.     this.shadowColor = "black"; 
  1887.     this.shadowOffx = "1";
  1888.     this.shadowOffy = "1";
  1889.     
  1890.     var arrAllSet = settings.split(",");
  1891.     for( var i = 0; i < arrAllSet.length; i ++ )
  1892.     {
  1893.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1894.         var arrOneSet = arrAllSet[i].split("=");
  1895.         for( var j = 0; j < arrOneSet.length; j++ )
  1896.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1897.         switch( arrOneSet[0] )
  1898.         {
  1899.         case "color" : this.shadowColor = arrOneSet[1]; break;
  1900.         case "offx" : this.shadowOffx = arrOneSet[1]; break;
  1901.         case "offy" : this.shadowOffy = arrOneSet[1]; break;
  1902.         }
  1903.     }
  1904. }
  1905.  
  1906. CAgencyDropShadow.prototype.PrepareEffect = function()
  1907. {
  1908.     CCSSP.PrepareFilter(this.ele);
  1909.     CCSSP.ShowObject(this.ele, true );
  1910.     
  1911.     if( this.ele.style.backgroundColor != "" )
  1912.     {//style.backgroundColor somehow stop the visual filter
  1913.         this.ele.intactBackgroundColor = this.ele.style.backgroundColor;
  1914.         this.ele.style.backgroundColor = "";
  1915.     }
  1916. }
  1917.  
  1918. CAgencyDropShadow.prototype.UpdateEffect = function()
  1919. {// to set the visual filter function
  1920.     this.PrepareEffect();
  1921.     this.ele.style.filter = "dropshadow(color=" + this.shadowColor + ", offx=" + 
  1922.         this.shadowOffx + ", offy=" + this.shadowOffy + ")";
  1923. }
  1924.  
  1925. CAgencyDropShadow.prototype.EndEffect = function()
  1926. {// to remove the visual filter function
  1927.     this.ele.style.filter = "";
  1928.     if( typeof(this.ele.intactBackgroundColor) != "undefined" )
  1929.         this.ele.style.backgroundColor = this.ele.intactBackgroundColor;
  1930. }
  1931. // End of the CAgencyDropShadow definition
  1932.  
  1933. // Begin of CAgencyRevealTrans definition
  1934. function CAgencyRevealTrans( element, settings )
  1935. {// because of "visual filter" style, this won't work in Navigator
  1936.     this.ele = element;
  1937.  
  1938.     // to set the default value
  1939.     this.duration = 1.0; //The value is specified in seconds.milliseconds format (0.0000).
  1940.     this.transition = 0;
  1941.     
  1942.     var arrAllSet = settings.split(",");
  1943.     for( var i = 0; i < arrAllSet.length; i ++ )
  1944.     {
  1945.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1946.         var arrOneSet = arrAllSet[i].split("=");
  1947.         for( var j = 0; j < arrOneSet.length; j++ )
  1948.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1949.         switch( arrOneSet[0] )
  1950.         {
  1951.         case "type" : this.transition = arrOneSet[1]; break;
  1952.         case "duration" : this.duration = 100/arrOneSet[1];    break;
  1953.         }
  1954.     }
  1955. }
  1956.  
  1957. CAgencyRevealTrans.prototype.PrepareEffect = function()
  1958. {
  1959.     CCSSP.PrepareFilter(this.ele);
  1960.     CCSSP.ShowObject( this.ele, false);
  1961. }
  1962.  
  1963. CAgencyRevealTrans.prototype.UpdateEffect = function()
  1964. {// to set the visual filter function
  1965.     if( typeof( this.ele.filters.RevealTrans ) == "object" )
  1966.     {
  1967.         if( this.ele.filters.RevealTrans.status == 2 )
  1968.             this.ele.filters.RevealTrans.stop();  
  1969.     }
  1970.  
  1971.     this.PrepareEffect();
  1972.     
  1973.     this.ele.style.filter = "RevealTrans(duration=" + this.duration + 
  1974.         ", transition=" + this.transition + ")";
  1975.     
  1976.     if( typeof( this.ele.filters.RevealTrans ) == "object" )
  1977.     {
  1978.         this.ele.filters.RevealTrans.apply();
  1979.         CCSSP.ShowObject( this.ele, true);
  1980.         this.ele.filters.RevealTrans.play();  
  1981.     }
  1982.     else
  1983.         CCSSP.ShowObject( this.ele, true);
  1984. }
  1985.  
  1986. CAgencyRevealTrans.prototype.EndEffect = function()
  1987. {
  1988.     if( typeof( this.ele.filters.RevealTrans ) == "object" )
  1989.         this.ele.filters.RevealTrans.stop();  
  1990.     this.ele.style.filter = "";
  1991. }
  1992. // End of the CAgencyRevealTrans definition
  1993.  
  1994. // Begin of CAgencyBlur definition
  1995. function CAgencyBlur( element, settings )
  1996. {// because of "visual filter" style, this won't work in Navigator
  1997.     this.ele = element;
  1998.  
  1999.     // to set the default value
  2000.     this.strength = "5";
  2001.     this.direction = "90";
  2002.     
  2003.     var arrAllSet = settings.split(",");
  2004.     for( var i = 0; i < arrAllSet.length; i ++ )
  2005.     {
  2006.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  2007.         var arrOneSet = arrAllSet[i].split("=");
  2008.         for( var j = 0; j < arrOneSet.length; j++ )
  2009.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  2010.         switch( arrOneSet[0] )
  2011.         {
  2012.         case "strength" : this.strength = arrOneSet[1]; break;
  2013.         case "direction" : this.direction = arrOneSet[1]; break;
  2014.         }
  2015.     }
  2016. }
  2017.  
  2018. CAgencyBlur.prototype.PrepareEffect = function()
  2019. {
  2020.     CCSSP.PrepareFilter(this.ele);
  2021.     CCSSP.ShowObject(this.ele, true );
  2022. }
  2023.  
  2024. CAgencyBlur.prototype.UpdateEffect = function()
  2025. {// to set the visual filter function
  2026.     CCSSP.PrepareFilter(this.ele);
  2027.     this.ele.style.filter = "blur(strength=" + this.strength + 
  2028.         ", direction=" + this.direction + ")";
  2029. }
  2030.  
  2031. CAgencyBlur.prototype.EndEffect = function()
  2032. {// to remove the visual filter function
  2033.     this.ele.style.filter = "";
  2034. }
  2035. // End of the CAgencyBlur definition
  2036.  
  2037. // Begin of CAgencyChangeFilter definition
  2038. function CAgencyChangeFilter( element, settings ) // flipH, flipV, invert, grey,
  2039. {// because of "visual filter" style, this won't work in Navigator
  2040.     this.ele = element;
  2041.  
  2042.     // to set the default value
  2043.     this.filterFunction = settings;
  2044. }
  2045.  
  2046. CAgencyChangeFilter.prototype.PrepareEffect = function()
  2047. {
  2048.     CCSSP.PrepareFilter(this.ele);
  2049.     CCSSP.ShowObject(this.ele, true );
  2050. }
  2051.  
  2052. CAgencyChangeFilter.prototype.UpdateEffect = function()
  2053. {// to set the visual filter function
  2054.     CCSSP.PrepareFilter(this.ele);
  2055.     this.ele.style.filter = this.filterFunction;
  2056. }
  2057.  
  2058. CAgencyChangeFilter.prototype.EndEffect = function()
  2059. {// to remove the visual filter function
  2060.     this.ele.style.filter = "";
  2061. }
  2062. // End of the CAgencyChangeFilter definition
  2063.  
  2064. // The effects below change the style on the fly, so they won't work in Navigator
  2065.  
  2066. // Begin of CAgencyFontChange definition, 
  2067. function CAgencyFontChange( element, settings )
  2068. {//this class can be replace by CAgencyChangeStyle,provided the "settings" is standard CSS string.
  2069.     this.ele = element;
  2070.     
  2071.     // to retrieve the original font style
  2072.     this.RetrieveOldFont( this.ele );
  2073.     
  2074.     // to set the default font to change
  2075.     this.newfontFamily = this.ele.oldFontFamily;
  2076.     this.newfColor = this.ele.oldColor;
  2077.     this.newtextDecoration = this.ele.oldTextDecoration;
  2078.     this.newfontWeight = this.ele.oldFontWeight;
  2079.     this.newfontStyle = this.ele.oldFontStyle;
  2080.     this.newfontSize = this.ele.oldFontSize;
  2081.     this.newBackgroundColor = this.ele.oldBackgroundColor;
  2082.     
  2083.     var arrAllSet = settings.split(",");
  2084.     for( var i = 0; i < arrAllSet.length; i ++ )
  2085.     {// to retrieve the setting
  2086.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  2087.         var arrOneSet = arrAllSet[i].split("=");
  2088.         for( var j = 0; j < arrOneSet.length; j++ )
  2089.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  2090.         switch( arrOneSet[0] )
  2091.         {
  2092.         case "font-family" : this.newfontFamily = arrOneSet[1]; break;
  2093.         case "color" : this.newfColor = arrOneSet[1]; break;
  2094.         case "underline" : this.newtextDecoration = (arrOneSet[1]=="on")? "underline" : "none"; break;
  2095.         case "bold" : this.newfontWeight = (arrOneSet[1]=="on")? "bold" : "normal"; break;
  2096.         case "italic" : this.newfontStyle = (arrOneSet[1]=="on")? "italic" : "normal"; break;
  2097.         case "size" : this.newfontSize = arrOneSet[1]; break;
  2098.         case "background-color" : this.newBackgroundColor = arrOneSet[1]; break;
  2099.         }
  2100.     }
  2101. }
  2102.  
  2103. CAgencyFontChange.prototype.RetrieveOldFont = function(objChild)
  2104. {
  2105.     if( typeof(objChild.oldFontFamily) == "undefined" )
  2106.         objChild.oldFontFamily = objChild.style.fontFamily;
  2107.     if( typeof(objChild.oldColor) == "undefined" )
  2108.         objChild.oldColor = objChild.style.color;
  2109.     if( typeof(objChild.oldTextDecoration) == "undefined" )
  2110.         objChild.oldTextDecoration = objChild.style.textDecoration;
  2111.     if( typeof(objChild.oldFontWeight) == "undefined" )
  2112.         objChild.oldFontWeight = objChild.style.fontWeight;
  2113.     if( typeof(objChild.oldFontStyle) == "undefined" )
  2114.         objChild.oldFontStyle = objChild.style.fontStyle;
  2115.     if( typeof(objChild.oldFontSize) == "undefined" )
  2116.         objChild.oldFontSize = objChild.style.fontSize;
  2117.     if( typeof(objChild.oldBackgroundColor) == "undefined" )
  2118.         objChild.oldBackgroundColor = objChild.style.backgroundColor;
  2119. }
  2120.  
  2121. CAgencyFontChange.prototype.PrepareEffect = function()
  2122. {
  2123.     // as for expanding text, the child is created after the constructor called
  2124.     for(var index = 0; index < this.ele.all.length; index++)
  2125.         this.RetrieveOldFont(this.ele.all[index]);
  2126.     CCSSP.ShowObject(this.ele, true );
  2127. }
  2128.  
  2129. CAgencyFontChange.prototype.UpdateEffect = function()
  2130. {// to change the font
  2131.     this.PrepareEffect();
  2132.     this.UpdateEffectAllChildren( this.ele );
  2133.     for( var index = 0; index < this.ele.all.length; index++)
  2134.         this.UpdateEffectAllChildren(this.ele.all[index]);
  2135. }
  2136.  
  2137. CAgencyFontChange.prototype.UpdateEffectAllChildren = function(objChild)
  2138. {
  2139.     objChild.style.fontFamily = this.newfontFamily;
  2140.     objChild.style.color = this.newfColor;
  2141.     objChild.style.textDecoration = this.newtextDecoration;
  2142.     objChild.style.fontWeight = this.newfontWeight;
  2143.     objChild.style.fontStyle = this.newfontStyle;
  2144.     objChild.style.fontSize = this.newfontSize;
  2145.     objChild.style.backgroundColor = this.newBackgroundColor;
  2146. }
  2147.  
  2148. CAgencyFontChange.prototype.EndEffect = function()
  2149. {// to reinstate the original font style
  2150.     this.EndEffectAllChildren( this.ele );
  2151.     for( var index = 0; index < this.ele.all.length; index++)
  2152.         this.EndEffectAllChildren(this.ele.all[index]);
  2153. }
  2154.  
  2155. CAgencyFontChange.prototype.EndEffectAllChildren = function( objChild )
  2156. {
  2157.     if( typeof(objChild.oldFontFamily) != "undefined" )
  2158.         objChild.style.fontFamily = objChild.oldFontFamily;
  2159.     if( typeof(objChild.oldColor) != "undefined" )
  2160.         objChild.style.color = objChild.oldColor;
  2161.     if( typeof(objChild.oldFontWeight) != "undefined" )
  2162.         objChild.style.fontWeight = objChild.oldFontWeight;
  2163.     if( typeof(objChild.oldFontStyle) != "undefined" )
  2164.         objChild.style.fontStyle = objChild.oldFontStyle;
  2165.     if( typeof(objChild.oldFontSize) != "undefined" )
  2166.         objChild.style.fontSize = objChild.oldFontSize;
  2167.     if( typeof(objChild.oldTextDecoration) != "undefined" )
  2168.         objChild.style.textDecoration = objChild.oldTextDecoration;
  2169.     if( typeof(objChild.oldBackgroundColor) != "undefined" )
  2170.         objChild.style.backgroundColor = objChild.oldBackgroundColor;
  2171. }
  2172. // End of the CAgencyFontChange definition
  2173.  
  2174. // Begin of the CAgencyChangeStyle definition
  2175. function CAgencyChangeStyle( element, settings )
  2176. {//this class can be replace by CAgencyChangeStyle,provided the "settings" is standard CSS string.
  2177.     this.ele = element;
  2178.     
  2179.     // to retrieve the original style
  2180.     this.oldstyle = this.ele.style.cssText;
  2181.     
  2182.     // to set the default style
  2183.     this.newStyle = this.oldstyle;
  2184.     
  2185.     if( typeof(settings) == "string" && settings.length > 1 )
  2186.         this.newStyle = this.oldstyle + " " + settings;
  2187. }
  2188.  
  2189. CAgencyChangeStyle.prototype.PrepareEffect = function()
  2190. {
  2191.     CCSSP.ShowObject(this.ele, true );
  2192. }
  2193.  
  2194. CAgencyChangeStyle.prototype.UpdateEffect = function()
  2195. {// to change the style
  2196.     this.ele.style.cssText = this.newStyle;
  2197. }
  2198.  
  2199. CAgencyChangeStyle.prototype.EndEffect = function()
  2200. {// to reinstate the original style
  2201.     this.ele.style.cssText = this.oldStyle;
  2202. }
  2203. // End of the CAgencyChangeStyle definition
  2204.  
  2205. //End the definition of CAgencyXXXX classes
  2206.  
  2207. //Begin to collaborate with other event handler settings 
  2208. CCSSP.RegisterEventHandler( window, "onload", "CEngine.OnPageLoad();BSSCOnLoad();kadovInitTriggersInHead();");
  2209. CCSSP.RegisterEventHandler( document, "onclick", "CEngine.OnPageClick();BSSCOnClick();");
  2210. CCSSP.RegisterEventHandler( document, "onmouseover", "CEngine.OnMouseOver();BSSCOnMouseOver();" );
  2211. CCSSP.RegisterEventHandler( document, "onmouseout", "CEngine.OnMouseOver();BSSCOnMouseOut();" );
  2212. CCSSP.RegisterEventHandler( window, "onunload", "BSSCOnUnload();");
  2213. //End to collaborate with other event handler settings
  2214.  
  2215.  
  2216. /// Section End  - CCSSP DHTM 2 (JavaScript 1.2)
  2217.  
  2218. //// Segment End -- (JavaScript 1.2)
  2219.